//
// Created by Admin on 2023/5/21.
//

#include "ShoppingCart.h"

void
Cashier::visitor(Book* book)
{
    if (book->getPrice() < 10.0) {
        totalForCart += book->getPrice();
    } else {
        totalForCart += book->getPrice() * 0.8;
    }
}

double
Cashier::getTotal()
{
    return totalForCart;
}
